-
Notifications
You must be signed in to change notification settings - Fork 14k
Add Box::clone_from_ref and similar under feature(clone_from_ref)
#149079
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
|
rustbot has assigned @Mark-Simulacrum. Use |
This comment has been minimized.
This comment has been minimized.
b2e067e to
dd72860
Compare
|
This PR was rebased onto a different main commit. Here's a range-diff highlighting what actually changed. Rebasing is a normal part of keeping PRs up to date, so no action is needed—this note is just to help reviewers. |
This comment has been minimized.
This comment has been minimized.
dd72860 to
aaf83c4
Compare
|
The job Click to see the possible cause of the failure (guessed by this bot)For more information how to resolve CI failures of this job, visit this link. |
Tracking issue: #149075
Accepted ACP: rust-lang/libs-team#483
This PR implements
clone_from_ref(andtry_*and_*invariants), to get aBox<T>,Arc<T>, orRc<T>by cloning from a&TwhereT: CloneToUninit.The "Implement..." commits replace some ad-hoc conversions with
clone_from_refvariants, which can be split out to a separate PR if desired.This PR will conflict with #148769 due to usage of
Layout::dangling(which that PR is renaming todangling_ptr), so they should not be rolled up together, and the one which merges later will need to be amended.